<template>
  <div>
    <img :src="data.captchaSrc" alt="Captcha" @click="refreshCaptcha"/>
  </div>
</template>

<script setup>
import {reactive} from "vue";
import {BASE_URL} from "@/store/constants";

const data = reactive({
  captchaSrc: BASE_URL + '/api/captcha?' + Math.random()
});
const refreshCaptcha = () => {
  data.captchaSrc = BASE_URL + '/api/captcha?' + Math.random()
};
defineExpose({ refreshCaptcha });
</script>

<style scoped>
/* Add your styles here */
</style>
